package main

import (
	"fmt"
	"html/template"
	"os"
)

func main(){
	fmt.Println("example of if in template")
	t1:=template.New("template test")
	t1=template.Must(t1.Parse("empty pipeline if demo: {{if ``}} no print{{end}}\n"))
	t1.Execute(os.Stdout,nil)
	
	t2:=template.New("template test")
	t2=template.Must(t2.Parse("not empty pipeline if demo: {{if `any`}} print here{{end}}\n"))
	t2.Execute(os.Stdout,nil)
	
	t3:=template.New("template test")
	t3=template.Must(t3.Parse("if-else demo: {{if ``}} if part {{else}}else part {{end}}\n"))
	t3.Execute(os.Stdout,nil)
}